package com.ruoyi.monitor.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.monitor.mapper.SysMsgModelMapper;
import com.ruoyi.monitor.domain.SysMsgModel;
import com.ruoyi.monitor.service.ISysMsgModelService;

/**
 * 邮件模板Service业务层处理
 * 
 * @author xzx
 * @date 2023-02-23
 */
@Service
public class SysMsgModelServiceImpl extends ServiceImpl<SysMsgModelMapper, SysMsgModel> implements ISysMsgModelService
{
    @Autowired
    private SysMsgModelMapper sysMsgModelMapper;

    /**
     * 查询邮件模板
     * 
     * @param id 邮件模板主键
     * @return 邮件模板
     */
    @Override
    public SysMsgModel selectSysMsgModelById(Long id)
    {
        return sysMsgModelMapper.selectSysMsgModelById(id);
    }

    /**
     * 查询邮件模板列表
     * 
     * @param sysMsgModel 邮件模板
     * @return 邮件模板
     */
    @Override
    public List<SysMsgModel> selectSysMsgModelList(SysMsgModel sysMsgModel)
    {
        return sysMsgModelMapper.selectSysMsgModelList(sysMsgModel);
    }

    /**
     * 新增邮件模板
     * 
     * @param sysMsgModel 邮件模板
     * @return 结果
     */
    @Override
    public int insertSysMsgModel(SysMsgModel sysMsgModel)
    {
        return sysMsgModelMapper.insertSysMsgModel(sysMsgModel);
    }

    /**
     * 修改邮件模板
     * 
     * @param sysMsgModel 邮件模板
     * @return 结果
     */
    @Override
    public int updateSysMsgModel(SysMsgModel sysMsgModel)
    {
        return sysMsgModelMapper.updateSysMsgModel(sysMsgModel);
    }

    /**
     * 批量删除邮件模板
     * 
     * @param ids 需要删除的邮件模板主键
     * @return 结果
     */
    @Override
    public int deleteSysMsgModelByIds(Long[] ids)
    {
        return sysMsgModelMapper.deleteSysMsgModelByIds(ids);
    }

    /**
     * 删除邮件模板信息
     * 
     * @param id 邮件模板主键
     * @return 结果
     */
    @Override
    public int deleteSysMsgModelById(Long id)
    {
        return sysMsgModelMapper.deleteSysMsgModelById(id);
    }
}
